package org.clearjerk.model.planet;

import java.io.IOException;
import java.util.HashMap;

import org.clearjerk.model.XMLReader;

public class WorldGenMgr {
	
	private HashMap<String,String> worldInfo;
	private int civRegions;
	private int regions;
	private int hostRegions;
	private BiomeType btype;
	
	public WorldGenMgr(String fname) throws IOException {
		XMLReader xmlreader = new XMLReader(fname);
		worldInfo = xmlreader.getInfo();
		load();
	}

	private void load() {
		System.out.println(worldInfo.toString());
		regions = Integer.parseInt(worldInfo.get("Regions"));
		civRegions = Integer.parseInt(worldInfo.get("CivRegions"));
		hostRegions = Integer.parseInt(worldInfo.get("HostRegions"));
	}

	public int getNumCivReigons() {
		return civRegions;
	}

	public int getNumReigons() {
		return regions;
	}

	public BiomeType getBiomeType() {
		return btype;
	}

	public Tile[][] genWorld() {
		// TODO Auto-generated method stub
		return null;
	}

	public int getNumHostileReigons() {
		return hostRegions;
	}

}
